package fina2.dcs.security;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@SuppressWarnings("serial")
@Table(name = "SYS_PERMISSIONS")
public class Permission implements Serializable {
	private BigDecimal id;
	private BigDecimal nameStrId;
	private String idName;
	private String permValue;
    private boolean checked;
    
	@Id
	@Column(name = "ID")
	public BigDecimal getId() {
		return id;
	}

	public void setId(BigDecimal id) {
		this.id = id;
	}

	@Column(name = "NAMESTRID")
	public BigDecimal getNameStrId() {
		return nameStrId;
	}

	public void setNameStrId(BigDecimal nameStrId) {
		this.nameStrId = nameStrId;
	}

	@Column(name = "IDNAME")
	public String getIdName() {
		return idName;
	}

	public void setIdName(String idName) {
		this.idName = idName;
	}

	@Transient
	public String getPermValue() {
		return permValue;
	}

	public void setPermValue(String permValue) {
		this.permValue = permValue;
	}

	@Transient
	public boolean isChecked() {
		return checked;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}

	public String toString(){
		return "[key=:"+idName+"]";
	}
	
}
